function login(data){
	var username = data.username;
	var markunit = data.markunit;
	var txt = document.createTextNode(username);
	document.getElementById("nick").appendChild(txt);
	txt = document.createTextNode(markunit);
	document.getElementById("ag").appendChild(txt);
}

function addLevel(data){
	
}

function addRoom(data){
	for(var i=0;i<data.length;i++){
		var a = document.createElement('a');
		if(i==0) a.setAttribute('class','actDep');
		a.setAttribute('onclick','tabDep('+i+')');
		var str = data[i].Name+" "+data[i].CurPlay+"/"+data[i].MaxPlay;
		var txt = document.createTextNode(str);
		a.appendChild(txt);
		document.getElementById("selectDep").appendChild(a);
	}
}